﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TestStu;
namespace _75静态
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Student student = new Student();
            Person p1 = new Person(12, "张三");
            Person p2 = new Person(13, "小明");

            Console.WriteLine(Person.num);
        }
    }

    internal class Person
    {
        public static int num;//总共创建了多少个人
        public int age;
        public string name;

        public Person()
        {
            num++;
        }

        public Person(int age, string name)
        {
            this.age = age;
            this.name = name;
        }
    }
}